class AttrValueData {
  final String value;
  final String? attrNameId;
  final List<String>? sku;

  AttrValueData({required this.value, this.attrNameId, this.sku});

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> json = {
      'value': value,
      'attr_name': attrNameId != null ? {'_id': attrNameId} : {},
    };
    if (sku != null) {
      json['sku'] = sku;
    }
    return json;
  }
}
